aboutsummaryrefslogtreecommitdiff
path: root/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineFunctionTests]/[method:pointersToFreeMutableVariablesAreStoredInAndLoadedFromEnvironment(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
diff options
context:
space:
mode:
Diffstat (limited to 'snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineFunctionTests]/[method:pointersToFreeMutableVariablesAreStoredInAndLoadedFromEnvironment(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected')
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineFunctionTests]/[method:pointersToFreeMutableVariablesAreStoredInAndLoadedFromEnvironment(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected63
1 files changed, 63 insertions, 0 deletions
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineFunctionTests]/[method:pointersToFreeMutableVariablesAreStoredInAndLoadedFromEnvironment(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineFunctionTests]/[method:pointersToFreeMutableVariablesAreStoredInAndLoadedFromEnvironment(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
new file mode 100644
index 00000000..2ef7f02e
--- /dev/null
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineFunctionTests]/[method:pointersToFreeMutableVariablesAreStoredInAndLoadedFromEnvironment(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -0,0 +1,63 @@
+Compilation unit elements:
+
+(
+ function
+ "shed__function__f__0"
+ visibility=private
+ locals=((param "closurePointer__0" data-ptr) (val "local__a" data-ptr) (val "local__b" data-ptr))
+ return-type=int
+ body=(
+ (
+ memory-load
+ (local "local__a")
+ pointer=(local "closurePointer__0")
+ layout=(struct (function-ptr (struct (data-ptr data-ptr))))
+ offset=(1 0)
+ )
+ (
+ memory-load
+ (local "local__b")
+ pointer=(local "closurePointer__0")
+ layout=(struct (function-ptr (struct (data-ptr data-ptr))))
+ offset=(1 1)
+ )
+ (return (local "local__a"))
+ )
+)
+
+Locals:
+ * (val "local__a" data-ptr)
+ * (val "local__b" data-ptr)
+ * (val "closure__f__0" int)
+ * (val "closurePointer__f__0" data-ptr)
+
+Instructions:
+
+(
+ (alloc-heap (local "closurePointer__f__0") (struct (function-ptr (struct (data-ptr data-ptr)))))
+ (
+ memory-store
+ pointer=(local "closurePointer__f__0")
+ layout=(struct (function-ptr (struct (data-ptr data-ptr))))
+ offset=(0)
+ value=(function-ptr "shed__function__f__0")
+ )
+ (data-ptr-to-int (local "closure__f__0") (local "closurePointer__f__0"))
+ (
+ memory-store
+ pointer=(local "closurePointer__f__0")
+ layout=(struct (function-ptr (struct (data-ptr data-ptr))))
+ offset=(1 0)
+ value=(local "local__a")
+ )
+ (
+ memory-store
+ pointer=(local "closurePointer__f__0")
+ layout=(struct (function-ptr (struct (data-ptr data-ptr))))
+ offset=(1 1)
+ value=(local "local__b")
+ )
+)
+
+Temporary stack:
+ * closure__f__0